students = []

while True:
    print("学生管理系统 V10.0")
    print("1. 添加学生信息")
    print("2. 删除学生信息")
    print("3. 修改学生信息")
    print("4. 查询所有学生信息")
    print("0. 退出系统")
    choice = input("请输入操作编号: ")

    if choice == "1":
        name = input("请输入学生姓名: ")
        id = input("请输入学生学号: ")
        student = {"name": name, "id": id}
        students.append(student)
        print("学生信息添加成功")
    elif choice == "2":
        id_to_delete = input("请输入要删除学生的学号: ")
        for student in students:
            if student["id"] == id_to_delete:
                students.remove(student)
                print("学生信息删除成功")
                break
        else:
            print("未找到该学号的学生")
    elif choice == "3":
        id_to_modify = input("请输入要修改学生的学号: ")
        for student in students:
            if student["id"] == id_to_modify:
                new_name = input("请输入新的姓名: ")
                student["name"] = new_name
                print("学生信息修改成功")
                break
        else:
            print("未找到该学号的学生")
    elif choice == "4":
        for student in students:
            print(f"姓名: {student['name']}, 学号: {student['id']}")
    elif choice == "0":
        print("已退出系统")
        break
    else:
        print("无效的操作编号，请重新输入")